L8BCA	CALL	#4026
	CALL	NZ,#442C
	CALL	#4524
	XOR	A
	LD	(#5D17),A
	LD	A,#AA
	LD	(#5B00),A
	LD	A,#07
	OUT	(#FE),A
	LD	HL,#FF57
	LD	DE,#3D00
	LD	(#5CB2),HL
	LD	SP,HL
	LD	HL,#1303
	PUSH	HL
	EX	DE,HL
	JP	(HL)
	XOR	A
	LD	(#465E),A
	LD	(#4098),A
	LD	(#4667),A
	LD	HL,#5F00
	LD	(#4677),HL
	LD	HL,#0000
	LD	(#466A),HL
L8C06	CALL	#407B
	CALL	#4416
	CALL	#40A5
	CALL	#42CE
	CALL	#40D2
	LD	B,#00
	LD	HL,(#4677)
	ADD	HL,BC
	LD	(#4677),HL
	LD	IX,#464E
	CALL	#43BF
	CALL	#407B
	CALL	#42CE
	CALL	#4136
	LD	IX,#4656
	CALL	#43BF
	CALL	#420F
	LD	A,(#465E)
	OR	A
	RET	NZ
	LD	HL,(#4677)
	LD	A,(HL)
	INC	A
	RET	Z
	JR	L8C06
	LD	A,#01
	LD	HL,#4098
	SUB	(HL)
	LD	(HL),A
	LD	IX,#45AE
	LD	A,(IX+0)
	CP	(IX+1)
	JR	NZ,L8C60
	LD	A,(HL)
	PUSH	IX
	CALL	#442C
	POP	IX
L8C60	LD	A,(IX+0)
	PUSH	AF
	LD	C,#01
	CALL	#441F
	POP	AF
	LD	C,#18
	JP	#441F
	LD	DE,#4679
	LD	BC,(#4677)
	EXX
	LD	B,#18
L8C79	EXX
	LD	A,(BC)
	INC	BC
	CP	#FF
	JR	Z,L8C99
	LD	H,#00
	LD	L,A
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	ADD	HL,HL
	PUSH	DE
	EX	DE,HL
	LD	HL,#F000
	ADD	HL,DE
	POP	DE
	PUSH	BC
	LD	BC,#0010
	LDIR
	POP	BC
	EXX
	DJNZ	L8C79
	EXX
L8C99	XOR	A
	LD	(DE),A
	RET
	LD	IX,#4679
	LD	C,#00
L8CA2	LD	A,(IX+0)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PUSH	AF
	ADD	A,#41
	CALL	#44BF
	POP	AF
	POP	HL
	INC	A
	CP	#04
	JR	NZ,L90F8
	LD	A,(#5C08)
	OR	A
	JR	Z,L90EE
	CP	#0D
	RET	Z
	CP	#08
	JR	NZ,L9128
	LD	A,(HL)
	OR	A
	JR	Z,L90EE
	DEC	A
	LD	(HL),A
	JR	L90EE
L9128	CP	#09
	JR	NZ,L90EE
	LD	A,(HL)
	INC	A
	CP	#04
	JR	Z,L90EE
	LD	(HL),A
	JR	L90EE
	DEFB	#03,#81,#88,#88,#C0,#42,#84,#81,#81,#81,#C0,#C0
	DEFB	#81,#82,#81,#C0,#24,#12,#0C,#18,#06,#0C,#0C,#C0
	DEFB	#0C,#0C,#81,#81,#C0,#82,#C0,#90,#84,#18,#0C,#90
	DEFB	#90,#30,#30,#88,#84,#22,#0C,#90,#06,#90,#24,#90
	DEFB	#0C,#05,#18,#84,#82,#84,#88,#88,#88,#28,#42,#00
	DEFB	#00,#2D,#00,#00,#00,#00,#00,#00,#00,#D4,#45,#B8
	DEFB	#45,#F1,#45,#0D,#46
	DEFB	#10,7,"INSERT ",#10,2,"INPUT ",#10,7,"DISK    ",#A0
	DEFB	#10,7,"INSERT ",#10,2,"OUTPUT ",#10,7,"DISK    ",#A0
	DEFB	#10,1,"OUTPUT DIRECTORY	FULL!	",#A0
	DEFB	#10,1,"OUTPUT DISK FULL!   ",#A0
	DEFB	#2C,#46,#33,#46,#3A,#46,#44,#46,#10,#00,#48,#A0
	DEFB	#00,#60,#00,#10,#00,#48,#A0
	DEFB	#00,#60,#00,#10,#00,#48,#A0
	DEFB	#00,#60,#3B,#00,#60,#00,#10,#00,#48,#A0
	DEFB	#00,#60,#40,#00,#60,#00,#00,#00,#00,#00,#0C,#2D
	DEFB	#36,#12,#00,#00,#00,#00,#08,#2D,#36,#12,#00,#00
	DEFB	#00,#00,#00,#00,#00,#00,#00,#00,#00,#00,#00,#00
	DEFB	#00,#00,#00,#00,#00,#00,#00,#00,#00,#00,#00,#00,#00
